package Core;

class IntegerPair implements Comparable {
  Integer _first;
  Double _second;

  public IntegerPair(Integer f, Double s) {
    _first = f;
    _second = s;
  }

  public int compareTo(Object o) {
    if (this.first() != ((IntegerPair )o).first())
      return this.first() - ((IntegerPair )o).first();
    else
      if ((this.second() - ((IntegerPair )o).second()) != 0.0)
    	  return 1;
      else
    	  return 0;
  }

  Integer first() { return _first; }
  Double second() { return _second; }
}
